<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<link rel="stylesheet" href="Public/Admin/Bootstrap/Css/bootstrap.min.css" />
	<link rel="stylesheet" href="Public/Admin/Css/common.css" />
	<script type="text/javascript" src='{{__PUBLIC__}}/jquery-1.8.2.min.js'></script>
	<script type="text/javascript">
		
	</script>
	<style type="text/css">
		body{
			margin-bottom: 100px;
		}
	</style>
</head>
<body>
	<div class="container-fluid">
	<div class="row-fluid">
	<div class="span12">

	<if condition="">
	<form action="{{U('edit',array('gid'=>Q('get.gid')))}}" method='post'>
	</if>
		<table class='table table-bordered table-hover'>
			<tr>
				<th  width="50px;">货品ID</th>
				{{foreach from="$newData" key="$k" value="$v"}}
				<th width="100px;">{{$k}}</th>
				{{endforeach}}
				<th width="100px;">货号</th>				
				<th width="100px;">库存</th>
			</tr>
			<!-- 如果已添加数目小于可能情况数目，才出现添加货品的输入框 -->
			<tr class="info">
				<td>修改货品</td>
					{{foreach from="$newData" value="$value"}}
					<td>
						<select name="group_id[]">
							{{foreach from="$value" key="$key" value="$v"}}
								<option value="{{$key}}"
									{{foreach from="$goodsListData['group_id']" value="$v2"}}
										{{if value="$v2==$v"}}
											selected="selected"
										{{endif}}
									{{endforeach}}
									>{{$v}}</option>
							{{endforeach}}
						</select>
					</td>
					{{endforeach}}
				<!--循环-->
			
				<td>
					<input type="text" name="glno" value="{{$goodsListData['glno']}}">
				</td>
				<td><input type="text" name="glstock" value="{{$goodsListData['glstock']}}"></td>
				<input type="hidden" name="good_gid" value="{{Q('get.gid',0)}}" />
				<input type="hidden" name="glid" value="{{Q('get.glid',0)}}" />
			</tr>
		</table>
		<input type="submit" value='保存添加' class="btn btn-primary"/>
	</form>
	</if>

	</div>
	</div>
	</div>


</script>
</body>
</html>